const _ = require('lodash');

let arr = [1,2,3,4,5,6]
let arr2 = _.chunk(arr,2);

console.log(arr2);

let arr3 = ['',,0,'0','a',' '];

let arr4 = _.compact(arr3);

console.log(arr4);